package com.appspot.categoryeditor.model;

import org.slim3.datastore.Attribute;
import org.slim3.datastore.Model;
import org.slim3.datastore.ModelRef;

import com.google.appengine.api.datastore.Key;

@Model
public class Category {
	
	@Attribute(primaryKey = true)
	private Key id;
	
	private String name;

	private long order;
	
	@Attribute(lob = true)
	private String content;
	
	private ModelRef<Folder> folderRef = new ModelRef<Folder>(Folder.class);
	
	private boolean accessible;
	
	@Attribute(version = true)
	private long version;

	public Key getId() {
		return id;
	}

	public void setId(Key id) {
		this.id = id;
	}

	public long getOrder() {
		return order;
	}

	public void setOrder(long order) {
		this.order = order;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public long getVersion() {
		return version;
	}

	public void setVersion(long version) {
		this.version = version;
	}

	public ModelRef<Folder> getFolderRef() {
		return folderRef;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public boolean isAccessible() {
		return accessible;
	}

	public void setAccessible(boolean accessible) {
		this.accessible = accessible;
	}

}
